package com.example.expresscabinet.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.expresscabinet.common.Result;
import com.example.expresscabinet.model.cabinet;
import com.example.expresscabinet.service.ICabinetService;
import com.example.expresscabinet.service.ISendexpressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/cabinet")
public class cabinetController {

    @Autowired
    ICabinetService cabinetService;


    //查询空柜子列表
    @GetMapping("/queryEmptyCabinet")
    public Result<?> queryEmptyCabinet(@RequestParam(defaultValue = "1") Integer pageNum,
                                       @RequestParam(defaultValue = "10") Integer pageSize){
        Page<cabinet> cabinetList=cabinetService.emptyCabinet(pageNum,pageSize);
        return Result.success(cabinetList);
    }


}
